package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.entity.result.HouseMsgBean;
import com.common.retrofit.entity.result.MyCollectionBean;
import com.common.retrofit.service.HaiNingService;

import java.util.ArrayList;

import rx.Observable;
import rx.Subscriber;

public class GetHouseMsgListMethods extends BaseMethods {

    private static GetHouseMsgListMethods m_ins = null;

    public static GetHouseMsgListMethods getInstance() {
        if (m_ins == null) {
            synchronized (GetHouseMsgListMethods.class) {
                if (m_ins == null) {
                    m_ins = new GetHouseMsgListMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "Other/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }

    // 获取首页数据
    public void property_knowledge(Subscriber<ArrayList<HouseMsgBean>> subscriber, int type) {
        Observable observable = initService().property_knowledge(System.currentTimeMillis()+"",
                "9f7a999afac43e6b50ef7204f69f93b7",type
        );
        toSubscribe(observable, subscriber);
    }
}
